<?php
/**
* +---------------------------------------------------------------------------+
* | $Id: domaindefaults.php 39 2005-05-21 18:38:47Z vluther $ 									|
* +---------------------------------------------------------------------------+
* | $Rev: 39 $ 																																|
* +---------------------------------------------------------------------------+
* | Copyright (c) 2002-2004 Linuxpowered, Inc 																|
* +---------------------------------------------------------------------------+
* | Author: Vidyut Luther 																										|
* +---------------------------------------------------------------------------+
*
* $URL: http://svn.linuxpowered.com/binder/admin/domaindefaults.php $
**/

$section = "ADMIN";
$title = "Domain Defaults "; 

require_once '../global.inc.php'; 
require_once INCLUDE_PATH . '/USER.class.php'; 
require_once INCLUDE_PATH . '/FQDN.class.php'; 

$objDom =& new FQDN(); 

$userlevel = $_SESSION['userlevel']; 
$curuser = $_SESSION['USERID']; 



$action = $_POST['action'];
$domid = $_GET['id']; 
 
if($action == 'modify') {
  $objDom->modifyDomain($_POST);
  $loc = WEB_BASE . "admin/fqdnlist.php"; 
  header("Location: $loc"); 
}

$objDom->mSetId($domid); 
$domProps = $objDom->mLoad();


$fqdnid = $objDom->getId();
$fqdn = $objDom->getFqdn();
$ttl = $objDom->getTTL(); 
$serial = $objDom->getSerial(); 
$refresh = $objDom->getRefresh();
$retry = $objDom->getRetry(); 
$expiry = $objDom->getExpiry();
$minimum = $objDom->getMinimum(); 
$soa = $objDom->getSOA(); 
$defaultip  = $objDom->getDefaultIp(); 
$server_group = $objDom->getServerGroup(); 

$groupOptions = $objDom->groupOptions($curuser,$server_group); 
$tpl->assign("groupOptions",$groupOptions); 


$tpl->assign("fqdnid",$fqdnid); 
$tpl->assign("fqdn",$fqdn); 
$tpl->assign("soa_ttl",$ttl); 
$tpl->assign("soa_mname",$soa);  
$tpl->assign("default_serial",$serial); 
$tpl->assign("default_refresh",$refresh); 
$tpl->assign("default_retry",$retry); 
$tpl->assign("default_expire",$expiry); 			
$tpl->assign("default_cache",$minimum); 
$tpl->assign("default_ip",$defaultip); 
#$tpl->assign("default_mx",$row['default_mx']); 

$tpl->display('domaindefaults.html'); 

?>
